namespace KYO.DAL {
    using System;
    using System.Text;
    using System.Collections;
    using System.Collections.Generic;
    
    public partial class Information : ObjectPersistence.ORNetBaseType {
        public Information() {
        }
        public Information(string Abstract, bool AllowComment, string Content, System.DateTime DateCreate, string ImageUrl, int Odering, bool Published, string Title) {
            this.Abstract = Abstract;
            this.AllowComment = AllowComment;
            this.Content = Content;
            this.DateCreate = DateCreate;
            this.ImageUrl = ImageUrl;
            this.Odering = Odering;
            this.Published = Published;
            this.Title = Title;
        }
        public Information(int InformationID, string Abstract, bool AllowComment, string Content, System.DateTime DateCreate, string ImageUrl, int Odering, bool Published, string Title) {
            this.InformationID = InformationID;
            this.Abstract = Abstract;
            this.AllowComment = AllowComment;
            this.Content = Content;
            this.DateCreate = DateCreate;
            this.ImageUrl = ImageUrl;
            this.Odering = Odering;
            this.Published = Published;
            this.Title = Title;
        }

        public int InformationID {
            get {
                return _InformationID;
            }
            set {
                this._InformationID = value;
                this.ChangesMade = true;
            }
        }
        public string Abstract {
            get {
                return _Abstract;
            }
            set {
                this._Abstract = value;
                this.ChangesMade = true;
            }
        }
        public bool AllowComment {
            get {
                return _AllowComment;
            }
            set {
                this._AllowComment = value;
                this.ChangesMade = true;
            }
        }
        public string Content {
            get {
                return _Content;
            }
            set {
                this._Content = value;
                this.ChangesMade = true;
            }
        }
        public System.DateTime DateCreate {
            get {
                return _DateCreate;
            }
            set {
                this._DateCreate = value;
                this.ChangesMade = true;
            }
        }
        public string ImageUrl {
            get {
                return _ImageUrl;
            }
            set {
                this._ImageUrl = value;
                this.ChangesMade = true;
            }
        }
        public int Odering {
            get {
                return _Odering;
            }
            set {
                this._Odering = value;
                this.ChangesMade = true;
            }
        }
        public bool Published {
            get {
                return _Published;
            }
            set {
                this._Published = value;
                this.ChangesMade = true;
            }
        }
        public string Title {
            get {
                return _Title;
            }
            set {
                this._Title = value;
                this.ChangesMade = true;
            }
        }


        public BusinessLayerHelper.PersistentList<KYO.DAL.Category> CategoryColl {
            get {
                if ((_CategoryColl == null)) {
                    if (IsNew) {
                        _CategoryColl = new BusinessLayerHelper.PersistentList<KYO.DAL.Category>();
                    }
                    else {
                        ObjectPersistence.InformationAssembler _tempAssem = new ObjectPersistence.InformationAssembler();
                        _CategoryColl = _tempAssem.GetCategoryColl(InformationID);
                    }
                }
                return _CategoryColl;
            }
            set {
                this._CategoryColl = value;
            }
        }
        public BusinessLayerHelper.PersistentList<KYO.DAL.Comment> CommentCollection {
            get {
                if ((_CommentCollection == null)) {
                    if (IsNew) {
                        _CommentCollection = new BusinessLayerHelper.PersistentList<KYO.DAL.Comment>();
                    }
                    else {
                        ObjectPersistence.InformationAssembler _tempAssem = new ObjectPersistence.InformationAssembler();
                        _CommentCollection = _tempAssem.GetCommentCollection(InformationID);
                    }
                }
                return _CommentCollection;
            }
            set {
                this._CommentCollection = value;
            }
        }


        private int _InformationID;
        private string _Abstract;
        private bool _AllowComment;
        private string _Content;
        private System.DateTime _DateCreate;
        private string _ImageUrl;
        private int _Odering;
        private bool _Published;
        private string _Title;
        private BusinessLayerHelper.PersistentList<KYO.DAL.Category> _CategoryColl;
        private BusinessLayerHelper.PersistentList<KYO.DAL.Comment> _CommentCollection;


        public bool IsCommentCollectionNull() {
            return (this._CommentCollection == null);
        }
        public bool IsCategoryCollNull() {
            return (this._CategoryColl == null);
        }
        public string ROKeyString {
            get {
                return ("KYO.DAL.Information" + InformationID.ToString());
            }
        }

    }
}
